<!DOCTYPE html>
<!--
  Copyright 2016 Google Inc. All rights reserved.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      https://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License
-->
<html>
  <head>
    <meta charset="utf-8">
    <title>MDL Card Demo</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <script src="assets/material-design-lite.css.js" charset="utf-8"></script>
    <style>
      .demo-card {
        max-width: 21.875rem; /* 350sp */
        margin-bottom: 48px;
      }

      @media(min-width: 768px) {
        .demo-card {
          margin-bottom: 24px;
        }
      }

      .demo-card--with-avatar .mdl-card__primary {
        position: relative;
      }

      .demo-card--with-avatar .demo-card__avatar {
        position: absolute;
        background: #bdbdbd;
        height: 2.5rem; /* 40sp */
        width: 2.5rem; /* 40sp */
        border-radius: 50%;
      }

      .demo-card--with-avatar .mdl-card__title,
      .demo-card--with-avatar .mdl-card__subtitle {
        margin-left: 56px;
      }

      .demo-card__16-9-media {
        background-image: url("images/16-9.jpg");
        background-size: cover;
        background-repeat: no-repeat;
        height: 12.313rem; /* 197sp, for 16:9 ratio with 350sp demo card width */
      }
    </style>
  </head>
  <body>
    <main>
      <h1>MDL Cards</h1>
      <section class="demo-typography--section mdl-typography">
        <div class="mdl-card demo-card">
          <section class="mdl-card__media demo-card__16-9-media"></section>
          <section class="mdl-card__supporting-text">
            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.
          </section>
        </div>

        <div class="mdl-card demo-card demo-card--with-avatar">
          <section class="mdl-card__primary">
            <div class="demo-card__avatar"></div>
            <h1 class="mdl-card__title">Title</h1>
            <h2 class="mdl-card__subtitle">Subhead</h2>
          </section>
          <section class="mdl-card__media demo-card__16-9-media"></section>
          <section class="mdl-card__supporting-text">
            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.
          </section>
          <section class="mdl-card__actions">
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 1</button>
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 2</button>
          </section>
        </div>

        <div class="mdl-card demo-card demo-card--with-avatar">
          <section class="mdl-card__primary">
            <div class="demo-card__avatar"></div>
            <h1 class="mdl-card__title">Title</h1>
            <h2 class="mdl-card__subtitle">Subhead</h2>
          </section>
          <section class="mdl-card__media demo-card__16-9-media"></section>
          <section class="mdl-card__actions mdl-card__actions--vertical">
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 1</button>
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 2</button>
          </section>
        </div>

        <div class="mdl-card demo-card">
          <section class="mdl-card__media demo-card__16-9-media"></section>
          <section class="mdl-card__primary">
            <h1 class="mdl-card__title mdl-card__title--large">Title goes here</h1>
            <h2 class="mdl-card__subtitle">Subtitle here</h2>
          </section>
          <section class="mdl-card__actions">
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 1</button>
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 2</button>
          </section>
        </div>

        <div class="mdl-card demo-card">
          <section class="mdl-card__primary">
            <h1 class="mdl-card__title mdl-card__title--large">Title goes here</h1>
            <h2 class="mdl-card__subtitle">Subtitle here</h2>
          </section>
          <section class="mdl-card__supporting-text">
            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
            dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
            ea commodo consequat.
          </section>
          <section class="mdl-card__actions">
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 1</button>
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 2</button>
          </section>
        </div>

        <style>
          .demo-card--bg-demo {
            height: 21.875rem; /* 350sp */
            background-image: url("images/1-1.jpg");
            background-size: cover;
            background-repeat: no-repeat;
          }

          .demo-card--bg-demo .mdl-card__primary,
          .demo-card--bg-demo .mdl-card__actions {
            background: rgba(0, 0, 0, .4);
          }
        </style>
        <div class="mdl-card mdl-card--theme-dark demo-card demo-card--bg-demo">
          <section class="mdl-card__primary">
            <h1 class="mdl-card__title mdl-card__title--large">Title goes here</h1>
            <h2 class="mdl-card__subtitle">Subtitle here</h2>
          </section>
          <section class="mdl-card__actions">
            <button class="mdl-button mdl-button--compact mdl-button--theme-dark mdl-card__action">Action 1</button>
            <button class="mdl-button mdl-button--compact mdl-button--theme-dark mdl-card__action">Action 2</button>
          </section>
        </div>

        <style>
          .demo-card--small {
            max-width: 10.938rem; /* 175sp */
          }

          .demo-card--small .mdl-card__media {
            background-image: url("images/1-1.jpg");
            background-size: cover;
            background-repeat: no-repeat;
            height: 10.938rem; /* 175sp, for 1:1 ratio with 175sp demo card width */
          }
        </style>
        <div class="mdl-card demo-card demo-card--small">
          <section class="mdl-card__media">
            <h1 class="mdl-card__title mdl-card__title--large">Title</h1>
          </section>
          <section class="mdl-card__actions">
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 1</button>
          </section>
        </div>

        <div class="mdl-card demo-card">
          <div class="mdl-card__horizontal-block">
            <section class="mdl-card__primary">
              <h1 class="mdl-card__title mdl-card__title--large">Title here</h1>
              <h2 class="mdl-card__subtitle">Subtitle here</h2>
            </section>
            <img class="mdl-card__media-item" src="images/1-1.jpg"></img>
          </div>
          <section class="mdl-card__actions">
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 1</button>
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 2</button>
          </section>
        </div>

        <div class="mdl-card demo-card">
          <div class="mdl-card__horizontal-block">
            <section class="mdl-card__primary">
              <h1 class="mdl-card__title mdl-card__title--large">Title here</h1>
              <h2 class="mdl-card__subtitle">Subtitle here</h2>
            </section>
            <img class="mdl-card__media-item mdl-card__media-item--1dot5x" src="images/1-1.jpg"></img>
          </div>
          <section class="mdl-card__actions">
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 1</button>
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 2</button>
          </section>
        </div>

        <div class="mdl-card demo-card">
          <div class="mdl-card__horizontal-block">
            <section class="mdl-card__primary">
              <h1 class="mdl-card__title mdl-card__title--large">Title here</h1>
              <h2 class="mdl-card__subtitle">Subtitle here</h2>
            </section>
            <img class="mdl-card__media-item mdl-card__media-item--2x" src="images/1-1.jpg"></img>
          </div>
          <section class="mdl-card__actions">
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 1</button>
            <button class="mdl-button mdl-button--compact mdl-card__action">Action 2</button>
          </section>
        </div>

        <div class="mdl-card demo-card">
          <div class="mdl-card__horizontal-block">
            <img class="mdl-card__media-item mdl-card__media-item--3x" src="images/1-1.jpg"></img>
            <section class="mdl-card__actions mdl-card__actions--vertical">
              <!-- TODO(sgomes): Replace with icon buttons when we have those. -->
              <button class="mdl-button mdl-button--compact mdl-card__action">A1</button>
              <button class="mdl-button mdl-button--compact mdl-card__action">A2</button>
            </section>
          </div>
        </div>
      </section>
    </main>
  </body>
</html>
